var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function a() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (a.prototype = e.prototype, 
    new a());
}), a = this && this.__decorate || function(t, e, o, a) {
    var n, r = arguments.length, i = r < 3 ? e : null === a ? a = Object.getOwnPropertyDescriptor(e, o) : a;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) i = Reflect.decorate(t, e, o, a); else for (var c = t.length - 1; 0 <= c; c--) (n = t[c]) && (i = (r < 3 ? n(i) : 3 < r ? n(e, o, i) : n(e, o)) || i);
    return 3 < r && i && Object.defineProperty(e, o, i), i;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("GameData"), s = e("AudioManager"), c = e("DrawManager"), l = e("OlympicManager"), d = e("UIManager"), u = e("Global"), p = e("PrefabView"), h = e("OlympicBigItemView"), f = e("OlympicItemView"), g = cc._decorator, m = g.ccclass, y = g.property, v = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.shadow = null, t.layout = null, t.item = null, t.bigItem = null, t;
    }
    return i(t, e), t.prototype.onLoad = function() {
        this.shadow.setContentSize(cc.winSize);
    }, t.prototype.onDestroy = function() {
        var t;
        e.prototype.onDestroy.call(this), 0 < u.G.queue.length && (1 == (t = u.G.queue.shift()).type ? d.default.getInstance().loadPnl(t.name) : 2 == t.type && d.default.getInstance().loadPopPnl(t.name, t.data));
    }, t.prototype.onClickDraw = function() {
        var t;
        s.default.getInstance().playAudio("按钮2"), r.GD.olympicDrawTotal++, r.GD.olympicDrawTime = Date.now(), 
        PD.data = c.default.getInstance().doDraw(l.default.getInstance().getDraw()), PD.data.type != u.RewardType.SKIN && PD.data.type != u.RewardType.ARM || (t = d.default.getInstance().getPnl("start")) && t.personView.init(), 
        u.G.queue.splice(0, 0, {
            name: "olympicOpen",
            type: 1,
            data: {}
        }), this.hidePnl();
    }, t.prototype.start = function() {
        this.init();
    }, t.prototype.init = function() {
        for (var t = 0; t < 5; t++) {
            var e, o, a = l.default.getInstance().getReward(t);
            0 == a.data.mode ? (o = (e = cc.instantiate(this.item.node)).getComponent(f.default)) && (o.init(a), 
            e.setParent(this.layout), e.active = !0) : this.bigItem.init(a);
        }
    }, a([ y(cc.Node) ], t.prototype, "shadow", void 0), a([ y(cc.Node) ], t.prototype, "layout", void 0), 
    a([ y(f.default) ], t.prototype, "item", void 0), a([ y(h.default) ], t.prototype, "bigItem", void 0), 
    a([ m ], t);
}(p.default);

n.default = v;